package com.example.hand.mybatis.config;

import org.springframework.boot.context.properties.ConfigurationProperties;

@ConfigurationProperties("hand.mybatis")
public class MybatisPerporties {

    private String driver;
    private String addressName;
    private String localUrl;
    private String userName;
    private String password;
    private String dbName;

    public String getDbName() {
        return dbName;
    }

    public void setDbName(String dbName) {
        this.dbName = dbName;
    }

    public String getDriver() {
        return driver;
    }

    public void setDriver(String driver) {
        this.driver = driver;
    }

    public String getAddressName() {
        return addressName;
    }

    public void setAddressName(String addressName) {
        this.addressName = addressName;
    }

    public String getLocalUrl() {
        return localUrl;
    }

    public void setLocalUrl() {
        this.localUrl = "jdbc:mysql://127.0.0.1:3306/"+getDbName()+"?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=UTC";
    }


    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
}
